<div class='fui-page fui-page-current order-pay-page'>
    <div class="fui-header">
         <div class="title">支付费用</div>
    </div>
    <div class='fui-content' style="padding:0.5rem">
        <div class="fui-cell-group radius" style="padding:1rem">
		<div class="fui-cell-title bold c">
                {{pagedata.store.title}}
        </div>
		<div class="fui-cell bold">
                <div class="fui-cell-label">支付金额：</div>
				<div class="fui-cell-info">
                    <input type="member" placeholder="请输入支付金额" class="fui-input" style="font-size:1rem;background-color:#f2f2f2" ng-model="pagedata.paymoney" />
                </div>
        </div>
		</div>
		<div style="padding:1rem">
			<a class="weui_btn weui_btn_primary" style="border-radius:1rem" href="javascript:" id="showTooltips" ng-click="pagedata.pay()">立即支付</a>
		 </div>
	</div>
</div>
<script type="text/javascript">
//购买
scope.pagedata.pay=function(){
	scope.post_json('jy_weishop_en/store.pay/post/',{'paymoney':scope.pagedata.paymoney},function(res){
			if(res.payid){
				scope.tool.pay(res.payid,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','','jy_weishop_en/member.index/');
						}else{
							scope.message('支付失败！失败原因：'+res.message,'error');
						}
				},'','','jy_weishop_en/member.index/');
			}
	});
	
}
</script>